<?php
    
    class TestModel extends Model{
        protected $table = 'test';
        protected $pk = 'id';

        public function reg($data){
            var_dump($this->db);
             return $this->db->autoExecute($this->table,$data,'insert');
        }

        //取所有的数据
        public function select(){
            $da = $this->db->query("select * from test");
            $arr = array();
             while ($row = mysqli_fetch_assoc($da)) {
                    array_push($arr,$row);
             }
             print_r($arr);
            return $arr;
            // return $this->db->query("select * from test");
        }
    }

